﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace IMCOM.Imagiality.ImageProcessing.Canvas2D.AutoContrast
{
    public class FirstPointSelection : Canvas2DAutoContrastState
    {
       
        public FirstPointSelection(AutoContrastImageEventListener controller) : base(controller)
        {
            controller.Calculator.SetLineStartAndEndPoints(new Point(0, 0), new Point(0, 0));
        }

        public override void MouseDown(object sender, MouseEventArgs e)
        {
            controller.Calculator.SetLineStartAndEndPoints(new Point(e.X, e.Y), new Point(e.X, e.Y));
            SetControllerState(new SecondPointSelection(controller));
        }

        public override void MouseUp(object sender, MouseEventArgs e)
        {
            // do nothing
        }

        public override void MouseMoved(object sender, MouseEventArgs e)
        {
            // do nothing
        }

        public override void ImagePainted(object sender, PaintEventArgs e)
        {
            // do nothing
        }
    }
}
